from aiogram import Bot, Dispatcher
import asyncio

from routers.main_router import router

TOKEN = open('TOKEN.txt', 'r').read()

async def on_startup():
    pass

async def on_shutdown():
    pass

def main():
    bot = Bot(token=TOKEN)
    dp = Dispatcher()
    dp.include_router(router)
    dp.startup.register(on_startup)
    dp.shutdown.register(on_shutdown)
    asyncio.run(dp.start_polling(bot))


if __name__ == '__main__':
    try:
        main()
    except KeyboardInterrupt:
        pass
